import { createApp } from 'vue'
import App from './App.vue'

import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' // 配置中文
import 'element-plus/dist/index.css'
import { registerElIcon } from '@/utils/elements-icon'

import router from './router/index.js' // 路由
// import '@/utils/rem.js' // 自适应分辨率监听
import axios from 'axios'

import * as echarts from 'echarts';

// import "uno.css";
// 本地svg
import 'virtual:svg-icons-register';
import SvgIcon from '@/components/SvgIcon'

import { setupStore } from "@/stores";


// 创建 Vue 实例
const app = createApp(App)
window.$vueApp = app;

// 后台管理相关
import 'normalize.css/normalize.css'
import '@/styles/index.scss'

// 配置全局属性
app.config.globalProperties.axios = axios
app.config.globalProperties.echarts = echarts

// import { useCounterStore } from './stores/counter.js'

app.component('svg-icon', SvgIcon)

// 链式安装插件
app.use(ElementPlus, { locale: zhCn }) // 使用中文
    .use(registerElIcon)
    .use(router)
    .use(setupStore).mount('#app')
